package cn.tedu.egmybits1.mapper;

import cn.tedu.egmybits1.pojo.entity.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ProductsMapper {
    @Insert("INSERT INTO product(title,price,stock) VALUES(#{title},#{price},#{stock})")
    void insert(Product product);

    @Delete("DELETE FROM product WHERE id=#{id}")
    int delete(Integer id);
}
